<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script>
        $(function() {
            $("button").click(function() {
                $.ajax({
                    url: 'http://apis.juhe.cn/simpleWeather/query',
                    type: 'get',
                    data: {
                        city: '武汉',
                        key: '0f0b3d5611a9da08749d57d651f70db3'
                    },
                    dataType: 'jsonp',
                    success: function(info) {
                        console.log(info)
                    },
                    error: function(error, Msgerror) {
                        console.log(Msgerror)
                    }
                });
            });
        })
    </script>
    <style>
        #d01 {
            height: 300px;
            border: crimson 2px solid;
        }
    </style>
</head>

<body>
    <div id="d01"></div>
    <button>get请求</button>

    <button type="button" class="btn btn-default">button</button>

</body>

</html>